package com.hr.controller;

import com.hr.dto.Result;
import com.hr.service.CategoryService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@CrossOrigin
@RestController
public class CategoryController {

    @Resource
    private CategoryService categoryService;

    @GetMapping("/getCategoryList")
    public Result getCategoryList(){
        return Result.ok(categoryService.getCategoryList());
    }
}
